package com.yyc.system.service.impl;

import com.yyc.system.dao.TClassMapper;
import com.yyc.system.model.TClass;
import com.yyc.system.service.ITClassService;
import com.yyc.core.AbstractService;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created by yyc on 2018/12/26.
 */
@Service
@Transactional(isolation = Isolation.DEFAULT, propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
public class TClassServiceImpl extends AbstractService<TClass> implements ITClassService {
	@Autowired
	private TClassMapper tClassMapper;

	@Override
	public List<TClass> queryUserClass(Integer userId) {
		if (userId != null) {
			List<TClass> tclass = tClassMapper.findUserClass(userId);
			return tclass;
		}
		return null;
	}

}
